import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '店铺名称',
    align: "center",
    dataIndex: 'store'
  },
  {
    title: '客户名称',
    align: "center",
    dataIndex: 'customer'
  },
  {
    title: '执行时间',
    align: "center",
    dataIndex: 'executiontime'
  },
  {
    title: '爬取数据时间',
    align: "center",
    dataIndex: 'crawlingdatatime',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
  {
    title: '爬取结果',
    align: "center",
    dataIndex: 'crawlingresults_dictText'
  },
  {
    title: '失败原因',
    align: "center",
    dataIndex: 'failurereason'
  },
  {
    title: '爬取平台',
    align: "center",
    dataIndex: 'crawlingplatform'
  },
];

// 高级查询数据
export const superQuerySchema = {
  store: {title: '店铺名称',order: 0,view: 'text', type: 'string',},
  customer: {title: '客户名称',order: 1,view: 'text', type: 'string',},
  executiontime: {title: '执行时间',order: 2,view: 'datetime', type: 'string',},
  crawlingdatatime: {title: '爬取数据时间',order: 3,view: 'date', type: 'string',},
  crawlingresults: {title: '爬取结果',order: 4,view: 'list', type: 'string',dictCode: '',},
  failurereason: {title: '失败原因',order: 5,view: 'text', type: 'string',},
  crawlingplatform: {title: '爬取平台',order: 6,view: 'text', type: 'string',},
};
